---
author: rescript-team
date: "2024-01-11"
previewImg: /blog/compiler_release_11_0.avif
title: ReScript 11.0
badge: release
description: |
  The ReScript developer experience now goes up to eleven!
---

Almost a year after the last release, ReScript is available in version 11! It marks the second major community-driven release and we are very thankful that there are so many willing contributors who invested their spare time into improving the compiler and its ecosystem.

Use your favorite package manager to install the new compiler release, e.g.:

```sh
npm install rescript@11
```

You can find the complete migration guide [here](../docs/manual/migrate-to-v11.mdx).

The complete list of changes can be found [here](https://github.com/rescript-lang/rescript/blob/v11.0.0/CHANGELOG). Let's have a look at the most notable improvements.

## Highlights

**Note**: As this release is packed, please refer to the linked blogposts for a detailed breakdown of each of the main new features.

### Customizable Variants

We are introducing new features that will improve interop with JavaScript/TypeScript, including customizable runtime representation of variants, zero cost bindings to discriminated unions, and unboxed variants that can be used to map to things like heterogenous array items and nullable values.

- [Better Interop with Customizable Variants](./improving-interop.mdx)

### Enhanced Ergonomics for Record Types

New enhancements for record types: Record Type Spread and Record Type Coercion. Record Type Spread allows one to share subsets of record fields with other record types, making it easier to work with types with lots of fields. And Record Type Coercion makes it easier to safely to convert between records with the same set of fields (or a subset).

- Blogpost: [Enhanced ergonomics for record types](./enhanced-ergonomics-for-record-types.mdx)

### First-class Dynamic Import Support

Another addition is first-class support for dynamic imports, which will allow developers to split up and load parts of the app code on demand as separate JS modules to prevent bundle bloat and reduce initial load times for applications.

- [First-class Dynamic Import Support](./first-class-dynamic-import-support.mdx)

### Uncurried Mode

This release is also introducing uncurried mode, which is a new default mode that compiles all dependencies as uncurried, and it aims to make it easier for newcomers to use the language.

- Blogpost: [Uncurried mode](./uncurried-mode.mdx)

### New Standard Library: ReScript Core

[ReScript Core](https://github.com/rescript-lang/rescript-core) is ReScript's new standard library. It replaces the complete `Js` module as well as some of the more frequently used modules from `Belt` and is recommended to use with uncurried mode.

The latest docs on [rescript-lang.org](/) already use it for the examples. Have a look at the new [RescriptCore API docs](/docs/manual/api/stdlib).

## More Features

Furthermore, there are a lot of smaller improvements of which we want to state only a few here.

### More types eligible for type coercion

The `:>` (type coercion) operator now supports a few more datatypes.

### Build System

The watcher can now be called with just `rescript -w`. Also `rescript build` will always build with dependencies by default so the argument `-with-deps` is not needed anymore.

### rescript.json

The compiler config file has been renamed to `rescript.json`. Since the rebrand from `BuckleScript` to `ReScript`, the `bs-` names make no sense anymore. Later on, we will also rename some of the config attributes, like `bs-dependencies`.

### Relaxed Suffix Rules

You can now freely choose the suffix of the generated JS files. We recommend `.res.js`/`.res.mjs` which is also what our official templates in [`create-rescript-app`](#create-rescript-app) are using.

### Opening files from current project globally

It's now possible to have a module opened by default that is just part of the current project. Previously, this only worked with dependencies or namespaced projects. For example, a file with the path `src/Utils.res` can be added to `bsc-flags` like so:

```json
{
  "bsc-flags": ["-open Utils"]
}
```

## Ecosystem

### Create-ReScript-App

Previously, the ReScript binary was able to initialize new projects itself. But it was required to have a global npm install to use it. This functionality has been removed.

Going forward, `create-rescript-app` is the new recommended way to setup a new project. It can even be used to quickly add ReScript to an existing project. Have a look at the updated [installation instructions](../docs/manual/installation.mdx) for how to use it.

### ReScript-React v0.12

In tandem with the new ReScript release, a new version of ReScript-React is released as well. It brings support for dynamically loading React components via `React.lazy`, and more. Check out the [corresponding docs](../docs/react/installation.mdx).

### ReScript Tools / Documentation Extraction

There is a new experimental tool available that is a building block for documentation generation from ReScript files. It can be installed and used as follows:

```sh
npm install --save-dev @rescript/tools
npx rescript-tools doc src/MyFile.res > doc.json
```

The tool generates a JSON structure with all the information you need to generate documentation automatically for your ReScript code. It also comes with ReScript bindings for that JSON. Shortly we'll also have automatic markdown generation, and we're planning a static site generator as well, so getting a nice looking and useful documentation site for your ReScript code is just a command away.

### LSP

Our LSP powers our editor tooling. Historically, it has lived within the VSCode extension. This has been a problem for people who do not use VSCode. So, we've made sure that each new LSP version is [published standalone to NPM](https://www.npmjs.com/package/@rescript/language-server).

This makes using an up-to-date version of the LSP in other editors than VSCode much easier. You can install and use it like so:

```sh
npm install -g @rescript/language-server
npx rescript-language-server --stdio
```

## What's next

As we now finish up the work on v11, we're looking forward to working on the next ReScript version. Here are some of the features we're planning to focus on in upcoming versions:

- Make JSX usable beyond React:
  - [Generic JSX transform](https://github.com/rescript-lang/rescript/issues/6408)
  - [JSX preserve mode](https://github.com/rescript-lang/rescript/issues/6197)
- Integrate the Rescript Core standard library into the compiler
  - remove the OCaml standard library
  - remove `Belt` but keep it available as external package
- Make maintaining TS libraries with ReScript a breeze, [thanks to genType](https://github.com/rescript-lang/rescript/issues/6210)
- Support [tagged template literals](https://github.com/rescript-lang/rescript/pull/6250)
- [Dedicated syntax for creating Dicts](https://github.com/rescript-lang/rescript/issues/6545)
- [Array spread syntax](https://github.com/rescript-lang/rescript/issues/6546)
- A [new custom build system](https://github.com/rolandpeelen/rewatch) with better support for workspaces / monorepos
- More improvements to the type system

## Acknowledgements

We want to thank everyone from the community who volunteered their precious time to support this project with contributions of any kind, from documentation, to PRs, to discussions in the forum.

## That's it

We hope you enjoy the newest improvements as much as we do.

In case of issues / problems, make sure to report bugs to one of the following repositories:

- [rescript-lang/rescript](https://github.com/rescript-lang/rescript) (language / syntax / jsx)
- [rescript-lang/rescript-react](https://github.com/rescript-lang/rescript-react) (React bindings)
- [rescript-lang/rescript-vscode](https://github.com/rescript-lang/rescript-vscode) (VSCode language support, LSP, tools)
- [rescript-lang/create-rescript-app](https://github.com/rescript-lang/create-rescript-app) (project generator) or
- [rescript-association/rescript-lang.org](https://github.com/rescript-lang/rescript-lang.org) (documentation)
